package com.jrapider.manager.controller.menu;

import com.jrapider.manager.data.om.SysMenu;
import com.jrapider.manager.service.menu.SysMenuService;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.jrapider.controller.BaseCrudController;


@Controller
@RequestMapping("/menu")
@Api(tags = {"sysMenu"})
public class SysMenuController extends BaseCrudController<SysMenuService, SysMenu> {
    @Override
    public void buildCondition(QueryWrapper<SysMenu> qw, SysMenu condition, String filter) {
        if (!StringUtils.isEmpty(filter)) {
            qw.like("title", filter);
        }
        qw.orderByAsc("sortcode");

    }
}
